home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Utilities / Virus Checkers / Info About Viruses / Virus Encyclopedia / card_14661.txt < prev    next >
Text File  |  1990-01-29  |  5KB  |  160 lines

  1. -- card: 14661 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 2783
  5. -- name: Dukakis Vaccine
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: A003
  11. -- rect: left=299 top=23 right=45 bottom=461
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Install Dukakis Vaccine
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   answer "Add the vaccine to the Home Stack script?" with "OK" or "Cancel"
  23.   if it is "Cancel" then exit mouseUp
  24.   else
  25.     put the script of button "Dukakis Vaccine Script" into vaccineScript
  26.     push card
  27.     go home
  28.     get the script of this stack
  29.     put vaccineScript after it
  30.     set the script of this stack to it
  31.     pop card
  32.   end if
  33. end mouseUp
  34.  
  35.  
  36.  
  37. -- part 2 (button)
  38. -- low flags: 80
  39. -- high flags: 8004
  40. -- rect: left=177 top=321 right=338 bottom=340
  41. -- title width / last selected line: 0
  42. -- icon id / first selected line: 0 / 0
  43. -- text alignment: 1
  44. -- font id: 0
  45. -- text size: 12
  46. -- style flags: 0
  47. -- line height: 16
  48. -- part name: Dukakis Vaccine Script
  49. ----- HyperTalk script -----
  50. -- Note: "Duk-akis" contains a dash here to prevent the vaccine from
  51. -- detecting itself as a virus.
  52.  
  53. -- Script to detect the spread of the ‚ÄúDuk-akis‚Äù virus. It works by
  54. -- trapping the ‚Äúset‚Äù command. I haven‚Äôt seen ‚ÄúDuk-akis‚Äù, but I should
  55. -- think that it works by setting the scripts of various objects to
  56. -- whatever they were plus an ‚Äúon openStack‚Äù handler. Well, by trapping
  57. -- the ‚Äúset‚Äù command, we can then find out if we are setting a script.
  58. -- If we are, then we can sort of work like ‚ÄúVaccine‚Äù does; i.e., we
  59. -- prompt the user to see if he or she wants to allow the command to
  60. -- continue. If it is stopped, then all scripts are halted.
  61.  
  62. -- Additionally, if the script contains the word ‚ÄúDuk-akis‚Äù, then no
  63. -- option is given ‚Äî the script is halted straight away.
  64.  
  65. -- THIS SCRIPT SHOULD BE INSTALLED IN THE ‚ÄúHOME‚Äù STACK,
  66. -- IN THE STACK SCRIPT.
  67.  
  68. -- You can test this script by making a new stack, then keying the
  69. -- following examples into the message box:
  70. -- ‚Ä¢ ‚ÄúSet the script of this stack to empty‚Äù
  71. -- ‚Ä¢ ‚ÄúSet the script of this stack to field 1‚Äù
  72. -- ‚Ä¢ ‚Äúset the script of this stack to Duk-akis‚Äù (don‚Äôt type the dash)
  73.  
  74. -- Try it, I think you‚Äôll like it!
  75.  
  76. -- This script is free to everyone apart from the person who wrote the
  77. -- ‚ÄúDuk-akis‚Äù virus. I just hope it affects every single stack he or
  78. -- she has or gets in the future!
  79.  
  80. -- Regards to all from a truely devoted HyperCard fan,
  81. -- Ian Summerfield
  82. -- Technical Support Supervisor
  83. -- Apple Computer UK Ltd.
  84. -- CIS: 76657, 742
  85. -- ‚ÄúSysop‚Äù - AppleFone HyperCard BBS: Luton, England: 0582 584134
  86.  
  87. -- Modified slightly 8/22/88 by Joe McMahon to make sure that
  88. --"set the script‚Ķ" (vs. "set script") doesn't slip through.
  89.  
  90. -- Modified a bit more 8/29/88 by Joe McMahon to add Ian's fixes
  91. -- to prevent the vaccine from detecting itself as a virus.
  92.  
  93. on set
  94.   put "Duk"&"akis" into duk
  95.   if the param of 1 is "script" or the param of 2 is "script" then
  96.     get the params
  97.     if last word of it is "to" then put it && "empty" into it
  98.     put it into s
  99.     if s contains duk then
  100.       repeat 10
  101.         play harpsichord tempo 300 "a b c b a b c b"
  102.       end repeat
  103.       answer duk&&"virus detected!" with "Halt scripts"
  104.       answer "Okay, you‚Äôre safe now! It didn‚Äôt spread."
  105.       exit to HyperCard
  106.     end if
  107.     play harpsichord tempo 200 "e c e c e c e"
  108.     answer "Warning: Script change requested" with "Show me"
  109.     repeat
  110.       answer s with "Allow" or "Stop!" or "Show more"
  111.       if it is "Allow" then pass set
  112.       else
  113.         if it is "Stop!" then
  114.           answer "All scripts halted!"
  115.           exit to HyperCard
  116.         else
  117.           put the userLevel into userSafe
  118.           set userLevel to 5
  119.           doMenu "New Field"
  120.           get the number of card fields
  121.           set rect of card field it to 0,19,512,342
  122.           set style of card field it to scrolling
  123.           put the params into card field it
  124.           choose browse tool
  125.           wait until not the mouseClick
  126.           wait until the mouseClick
  127.           choose field tool
  128.           click at loc of card field it
  129.           doMenu "Clear Field"
  130.           choose browse tool
  131.           set userLevel to userSafe
  132.         end if
  133.       end if
  134.     end repeat
  135.   else pass set
  136. end set
  137.  
  138.  
  139.  
  140. -- part contents for background part 10
  141. ----- text -----
  142. Dukakis Vaccine
  143.  
  144. -- part contents for background part 12
  145. ----- text -----
  146. Virus Prevention Programs
  147.  
  148.  
  149. -- part contents for background part 2
  150. ----- text -----
  151.    The Dukakis Vaccine was written by Ian Summerfield.  It is a HyperCard script designed to both detect the Dukakis virus and to prevent its invasion into stacks. The script is general enough to be of utility in blocking other HyperCard-only viruses.
  152.    Dukakis Vaccine only monitors changes to scripts; it cannot block viral XCMDs or XFCNs. It does not remove the virus, but blocks it and alerts you to the virus's presence.
  153.  
  154. -- part contents for background part 16
  155. ----- text -----
  156. Version: 8/29/88
  157.  
  158. -- part contents for background part 11
  159. ----- text -----
  160.    The Dukakis Vaccine can be installed in your home card using the above button.